package com.lanting.meetingserver.test;

import javax.annotation.Resource;


import org.junit.Test;
import org.junit.runner.RunWith;

import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.lanting.meetingserver.domain.User;
import com.lanting.meetingserver.service.impl.UserServiceImpl;



@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext.xml"})
public class UserServiceImplCase {


	@Resource
	private UserServiceImpl userService;

	
	
	@Test
	public void Login(){
		String loginId = "5";
		String password = "123";
		//userService = (UserServiceImpl)ctx.getBean("UserService");
		User user = null;
		user = userService.login(loginId, password);
		if (user != null) {
			System.out.println("登录成功");
		}else {
			System.out.println("登录失败");
		}
	}
}
